package com.itheima.itcasthealth.controller;

import com.itheima.itcasthealth.common.Result;
import com.itheima.itcasthealth.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/setmeal")
public class SetmealController {

    @Autowired
    private SetmealService setmealService;

    @GetMapping("/getAllSetmeal.do")
    public Result getAllSetmeal(){
        return setmealService.getAllSetmeal();
    }

    @PostMapping("/findById.do")
    public Result findById(Integer id){

        return setmealService.findById(id);
    }

}
